package com.example.novelstory.dao.jzx;

//import com.baomidou.mybatisplus.core.mapper.BaseMapper;
//import com.example.demo.entity.Novel;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.novelstory.entity.Novel;
import org.apache.ibatis.annotations.Mapper;

@Mapper
//@Repository
//baseMapper是mybatisPlus官方的写好的基础类
public interface NovelDao extends BaseMapper<Novel> {
////    全查
//    @Select("select * from novel")
//    public List<Novel> findAkk();
//
////    添加
//    @Insert("INSERT INTO novel(category,title,author,pic,content,tag,up,down,hits,rating,rating_count,serialize,favorites,position,template,link,create_time,update_time,reurl,status,hits_day,hits_week,hits_month,hits_time,word,recommend) VALUES(#{id,jdbcType=VARCHAR},#{category,jdbcType=VARCHAR},#{title,jdbcType=VARCHAR},#{author,jdbcType=VARCHAR},#{pic,jdbcType=VARCHAR},#{content,jdbcType=VARCHAR},#{tag,jdbcType=VARCHAR},#{up,jdbcType=VARCHAR},#{down,jdbcType=VARCHAR},#{hits,jdbcType=VARCHAR},#{rating,jdbcType=VARCHAR},#{rating_count,jdbcType=VARCHAR},#{serialize,jdbcType=VARCHAR},#{favorites,jdbcType=VARCHAR},#{position,jdbcType=VARCHAR},#{template,jdbcType=VARCHAR},#{link,jdbcType=VARCHAR},#{create_time,jdbcType=VARCHAR},#{update_time,jdbcType=VARCHAR},#{reurl,jdbcType=VARCHAR},#{status,jdbcType=VARCHAR},#{hits_day,jdbcType=VARCHAR},#{hits_week,jdbcType=VARCHAR},#{hits_month,jdbcType=VARCHAR},#{hits_time,jdbcType=VARCHAR},#{word,jdbcType=VARCHAR},#{recommend,jdbcType=VARCHAR})")
//    public int addNovel(@Param("category") String category,@Param("title") String title, @Param("author") String author,@Param("pic") String pic, @Param("content") String content,@Param("tag") String tag, @Param("up") String up, @Param("down") String down,@Param("hits") String hits, @Param("rating") String rating, @Param("rating_count") String rating_count,@Param("serialize") String serialize, @Param("favorites") String favorites,@Param("position") String position, @Param("template") String template,@Param("link") String link, @Param("create_time") String create_time,@Param("update_time") String update_time, @Param("reurl") String reurl,@Param("status") String status, @Param("hits_day") String hits_day, @Param("hits_week") String hits_week, @Param("hits_month") String hits_month,@Param("hits_time") String hits_time, @Param("word") String word, @Param("recommend") String recommend);
////    删除
//    @Delete("delete from novel where id=#{id}")
//    public int deleteNovel(int id);
////    作者查询
//    @Select("select * from novel where author=#{author} ")
//    public List<Novel> findByName(int author);
////    类容查询
//    @Select("select * from novel where content=#{content} ")
//    public List<Novel> byName(int content);
}